SET FPP=my_analysis_tools
SET program=my_main_programs
SET xprogram=executables
SET code=my_tracking_code
rem SET gf=g95
SET gf=gfortran 
SET flags=
REM
: START
rem END
@ echo on
%gf% %flags% -c %FPP%\y_my_own_da.f90
%gf% %flags% -c %FPP%\y_my_own_analysis.f90
set choice=
set /p choice= location in bat file (type 1,2,3,4, all)
if '%choice%'=='1' goto 1
if '%choice%'=='2' goto 2
if '%choice%'=='3' goto 3
if '%choice%'=='4' goto 4
if '%choice%'=='all' goto all
: 1
%gf% %flags% -c %program%\z_main1.f90
%gf% %flags% -o %xprogram%\z_main1 y_my_own_da.o y_my_own_analysis.o z_main1.o 
goto end
: 2
%gf% %flags% -c %program%\z_main2.f90
%gf% %flags% -o %xprogram%\z_main2 y_my_own_da.o y_my_own_analysis.o z_main2.o 
goto end
: 3
%gf% %flags% -c %program%\z_main3.f90
%gf% %flags% -o %xprogram%\z_main3 y_my_own_da.o y_my_own_analysis.o z_main3.o 
: 4
%gf% %flags% -c %code%\y_my_own_small_code.f90
%gf% %flags% -c %program%\z_my_nonlinear_twiss_average_x.f90
%gf% %flags% -o %xprogram%\z_my_nonlinear_twiss_average_x y_my_own_da.o y_my_own_analysis.o y_my_own_small_code.o z_my_nonlinear_twiss_average_x.o 
goto end
: all
%gf% %flags% -c %program%\z_main1.f90
%gf% %flags% -o %xprogram%\z_main1 y_my_own_da.o y_my_own_analysis.o z_main1.o 
%gf% %flags% -c %program%\z_main2.f90
%gf% %flags% -o %xprogram%\z_main2 y_my_own_da.o y_my_own_analysis.o z_main2.o 
%gf% %flags% -c %program%\z_main3.f90
%gf% %flags% -o %xprogram%\z_main3 y_my_own_da.o y_my_own_analysis.o z_main3.o 
%gf% %flags% -c %code%\y_my_own_small_code.f90
%gf% %flags% -c %program%\z_my_nonlinear_twiss_average_x.f90
%gf% %flags% -o %xprogram%\z_my_nonlinear_twiss_average_x y_my_own_da.o y_my_own_analysis.o y_my_own_small_code.o z_my_nonlinear_twiss_average_x.o 
:END


